import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Index',
    component: () => import('../views/Index.vue'),
    meta: {
      title: '答题练习'
    }
  },
  {
    path: '/enter',
    name: 'Enter',
    component: () => import('../views/Enter.vue'),
    meta: {
      title: '题库列表'
    }
  },
  {
    path: '/rule',
    name: 'Rule',
    component: () => import('../views/Rule.vue'),
    meta: {
      title: '答题规则'
    }
  },
  {
    path: '/record',
    name: 'Record',
    component: () => import('../views/Record.vue'),
    meta: {
      title: '答题练习'
    }
  },
  {
    path: '/ranking',
    name: 'Ranking',
    component: () => import('../views/Ranking.vue'),
    meta: {
      title: '答题练习'
    }
  },
  {
    path: '/answer',
    name: 'Answer',
    component: () => import('../views/Answer.vue'),
    meta: {
      title: '答题练习'
    }
  },
  {
    path: '/result',
    name: 'Result',
    component: () => import('../views/Result.vue'),
    meta: {
      title: '答题练习'
    }
  },
  {
    path: '/detail',
    name: 'Detail',
    component: () => import('../views/Detail.vue'),
    meta: {
      title: '答题练习'
    }
  }
]

const router = new VueRouter({
  routes
})

export default router
